<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class StoreMember extends Model
{
    use HasFactory;
    protected $table = "store_member";

    /**
     * 查询核销员列表
     * @return mixed
     */
    public static function memberList(){
        return self::where('status',0)->paginate(5);
    }

    /**
     * 添加核销员
     * @param $v
     * @return mixed
     */
    public static function addMember($v){
        return self::where('id',$v)->update(['status'=>1]);
    }

    /**
     * 核销员列表查询
     * @return mixed
     */
    public static function verifierList(){
        return self::where('status',1)->paginate(5);
    }

    /**
     * 核销员删除
     * @param $id
     * @return mixed
     */
    public static function delVerifier($id){
        return self::where('id',$id)->update(['status'=>0]);
    }
}
